#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.10.0
 Author:         myName

 Script Function:
	Template AutoIt script.

#ce ----------------------------------------------------------------------------

Func Staff_Button()

	$cstate1 = GUICtrlRead( $Staff_Spell_1)
	$cstate2 = GUICtrlRead( $Staff_Spell_2)
	$cstate3 = GUICtrlRead( $Staff_Spell_3)
	$cstate4 = GUICtrlRead( $Staff_Spell_4)
	$cstate5 = GUICtrlRead( $Staff_Spell_5)
	$cstate6 = GUICtrlRead( $Staff_Spell_6)

	if $cstate1 = $GUI_CHECKED then 
		$Staff_data_1 = Sqrt(GUICtrlRead($Staff_Delay_1)*GUICtrlRead($Staff_Delay_1))
		$Staff_data_2 = "-" & Sqrt(GUICtrlRead($Staff_Delay_2)*GUICtrlRead($Staff_Delay_2))
		$Staff_data_3 = "-" & Sqrt(GUICtrlRead($Staff_Delay_3)*GUICtrlRead($Staff_Delay_3))
		$Staff_data_4 = "-" & Sqrt(GUICtrlRead($Staff_Delay_4)*GUICtrlRead($Staff_Delay_4))
		$Staff_data_5 = "-" & Sqrt(GUICtrlRead($Staff_Delay_5)*GUICtrlRead($Staff_Delay_5))
		$Staff_data_6 = "-" & Sqrt(GUICtrlRead($Staff_Delay_6)*GUICtrlRead($Staff_Delay_6))


    elseif $cstate2 = $GUI_CHECKED then 
		$Staff_data_1 = "-" & Sqrt(GUICtrlRead($Staff_Delay_1)*GUICtrlRead($Staff_Delay_1))
		$Staff_data_2 = Sqrt(GUICtrlRead($Staff_Delay_2)*GUICtrlRead($Staff_Delay_2))
		$Staff_data_3 = "-" & Sqrt(GUICtrlRead($Staff_Delay_3)*GUICtrlRead($Staff_Delay_3))
		$Staff_data_4 = "-" & Sqrt(GUICtrlRead($Staff_Delay_4)*GUICtrlRead($Staff_Delay_4))
		$Staff_data_5 = "-" & Sqrt(GUICtrlRead($Staff_Delay_5)*GUICtrlRead($Staff_Delay_5))
		$Staff_data_6 = "-" & Sqrt(GUICtrlRead($Staff_Delay_6)*GUICtrlRead($Staff_Delay_6))

    elseif $cstate3 = $GUI_CHECKED then 
		$Staff_data_1 = "-" & Sqrt(GUICtrlRead($Staff_Delay_1)*GUICtrlRead($Staff_Delay_1))
		$Staff_data_2 = "-" & Sqrt(GUICtrlRead($Staff_Delay_2)*GUICtrlRead($Staff_Delay_2))
		$Staff_data_3 = Sqrt(GUICtrlRead($Staff_Delay_3)*GUICtrlRead($Staff_Delay_3))
		$Staff_data_4 = "-" & Sqrt(GUICtrlRead($Staff_Delay_4)*GUICtrlRead($Staff_Delay_4))
		$Staff_data_5 = "-" & Sqrt(GUICtrlRead($Staff_Delay_5)*GUICtrlRead($Staff_Delay_5))
		$Staff_data_6 = "-" & Sqrt(GUICtrlRead($Staff_Delay_6)*GUICtrlRead($Staff_Delay_6))

        elseif $cstate4 = $GUI_CHECKED then 
      	$Staff_data_1 = "-" & Sqrt(GUICtrlRead($Staff_Delay_1)*GUICtrlRead($Staff_Delay_1))
		$Staff_data_2 = "-" & Sqrt(GUICtrlRead($Staff_Delay_2)*GUICtrlRead($Staff_Delay_2))
		$Staff_data_3 = "-" & Sqrt(GUICtrlRead($Staff_Delay_3)*GUICtrlRead($Staff_Delay_3))
		$Staff_data_4 = Sqrt(GUICtrlRead($Staff_Delay_4)*GUICtrlRead($Staff_Delay_4))
		$Staff_data_5 = "-" & Sqrt(GUICtrlRead($Staff_Delay_5)*GUICtrlRead($Staff_Delay_5))
		$Staff_data_6 = "-" & Sqrt(GUICtrlRead($Staff_Delay_6)*GUICtrlRead($Staff_Delay_6))

        elseif $cstate5 = $GUI_CHECKED then 
		$Staff_data_1 = "-" & Sqrt(GUICtrlRead($Staff_Delay_1)*GUICtrlRead($Staff_Delay_1))
		$Staff_data_2 = "-" & Sqrt(GUICtrlRead($Staff_Delay_2)*GUICtrlRead($Staff_Delay_2))
		$Staff_data_3 = "-" & Sqrt(GUICtrlRead($Staff_Delay_3)*GUICtrlRead($Staff_Delay_3))
		$Staff_data_4 = "-" & Sqrt(GUICtrlRead($Staff_Delay_4)*GUICtrlRead($Staff_Delay_4))
		$Staff_data_5 = Sqrt(GUICtrlRead($Staff_Delay_5)*GUICtrlRead($Staff_Delay_5))
		$Staff_data_6 = "-" & Sqrt(GUICtrlRead($Staff_Delay_6)*GUICtrlRead($Staff_Delay_6))

        elseif $cstate6 = $GUI_CHECKED then 
		$Staff_data_1 = "-" & Sqrt(GUICtrlRead($Staff_Delay_1)*GUICtrlRead($Staff_Delay_1))
		$Staff_data_2 = "-" & Sqrt(GUICtrlRead($Staff_Delay_2)*GUICtrlRead($Staff_Delay_2))
		$Staff_data_3 = "-" & Sqrt(GUICtrlRead($Staff_Delay_3)*GUICtrlRead($Staff_Delay_3))
		$Staff_data_4 = "-" & Sqrt(GUICtrlRead($Staff_Delay_4)*GUICtrlRead($Staff_Delay_4))
		$Staff_data_5 = "-" & Sqrt(GUICtrlRead($Staff_Delay_5)*GUICtrlRead($Staff_Delay_5))
		$Staff_data_6 = Sqrt(GUICtrlRead($Staff_Delay_6)*GUICtrlRead($Staff_Delay_6))

	Endif

		IniWrite ( "attackhack.ini", "staff", "spell1delay", $Staff_data_1)
		IniWrite ( "attackhack.ini", "staff", "spell2delay", $Staff_data_2)
		IniWrite ( "attackhack.ini", "staff", "spell3delay", $Staff_data_3)
		IniWrite ( "attackhack.ini", "staff", "spell4delay", $Staff_data_4)
		IniWrite ( "attackhack.ini", "staff", "spell5delay", $Staff_data_5)
		IniWrite ( "attackhack.ini", "staff", "spell6delay", $Staff_data_6)
EndFunc

Func Staff_Spell1()

		GUICtrlSetState($Staff_Label_1, $GUI_ENABLE)
		GUICtrlSetState($Staff_Label_2, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_3, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_4, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_5, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_6, $GUI_DISABLE)

		GUICtrlSetState($Staff_Delay_1, $GUI_ENABLE)
		GUICtrlSetState($Staff_Delay_2, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_3, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_4, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_5, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_6, $GUI_DISABLE)

		$Staff_data_1 = Sqrt(GUICtrlRead($Staff_Delay_1)*GUICtrlRead($Staff_Delay_1))
		$Staff_data_2 = "-" & Sqrt(GUICtrlRead($Staff_Delay_2)*GUICtrlRead($Staff_Delay_2))
		$Staff_data_3 = "-" & Sqrt(GUICtrlRead($Staff_Delay_3)*GUICtrlRead($Staff_Delay_3))
		$Staff_data_4 = "-" & Sqrt(GUICtrlRead($Staff_Delay_4)*GUICtrlRead($Staff_Delay_4))
		$Staff_data_5 = "-" & Sqrt(GUICtrlRead($Staff_Delay_5)*GUICtrlRead($Staff_Delay_5))
		$Staff_data_6 = "-" & Sqrt(GUICtrlRead($Staff_Delay_6)*GUICtrlRead($Staff_Delay_6))

		IniWrite ( "attackhack.ini", "staff", "spell1delay", $Staff_data_1 )
		IniWrite ( "attackhack.ini", "staff", "spell2delay", $Staff_data_2 )
		IniWrite ( "attackhack.ini", "staff", "spell3delay", $Staff_data_3 )
		IniWrite ( "attackhack.ini", "staff", "spell4delay", $Staff_data_4 )
		IniWrite ( "attackhack.ini", "staff", "spell5delay", $Staff_data_5 )
		IniWrite ( "attackhack.ini", "staff", "spell6delay", $Staff_data_6 )

EndFunc

Func Staff_Spell2()
		GUICtrlSetState($Staff_Label_1, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_2, $GUI_ENABLE)
		GUICtrlSetState($Staff_Label_3, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_4, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_5, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_6, $GUI_DISABLE)

		GUICtrlSetState($Staff_Delay_1, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_2, $GUI_ENABLE)
		GUICtrlSetState($Staff_Delay_3, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_4, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_5, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_6, $GUI_DISABLE)

		$Staff_data_1 = "-" & Sqrt(GUICtrlRead($Staff_Delay_1)*GUICtrlRead($Staff_Delay_1))
		$Staff_data_2 = Sqrt(GUICtrlRead($Staff_Delay_2)*GUICtrlRead($Staff_Delay_2))
		$Staff_data_3 = "-" & Sqrt(GUICtrlRead($Staff_Delay_3)*GUICtrlRead($Staff_Delay_3))
		$Staff_data_4 = "-" & Sqrt(GUICtrlRead($Staff_Delay_4)*GUICtrlRead($Staff_Delay_4))
		$Staff_data_5 = "-" & Sqrt(GUICtrlRead($Staff_Delay_5)*GUICtrlRead($Staff_Delay_5))
		$Staff_data_6 = "-" & Sqrt(GUICtrlRead($Staff_Delay_6)*GUICtrlRead($Staff_Delay_6))

		IniWrite ( "attackhack.ini", "staff", "spell1delay", $Staff_data_1 )
		IniWrite ( "attackhack.ini", "staff", "spell2delay", $Staff_data_2 )
		IniWrite ( "attackhack.ini", "staff", "spell3delay", $Staff_data_3 )
		IniWrite ( "attackhack.ini", "staff", "spell4delay", $Staff_data_4 )
		IniWrite ( "attackhack.ini", "staff", "spell5delay", $Staff_data_5 )
		IniWrite ( "attackhack.ini", "staff", "spell6delay", $Staff_data_6 )

EndFunc

Func Staff_Spell3()
		GUICtrlSetState($Staff_Label_1, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_2, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_3, $GUI_ENABLE)
		GUICtrlSetState($Staff_Label_4, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_5, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_6, $GUI_DISABLE)

		GUICtrlSetState($Staff_Delay_1, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_2, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_3, $GUI_ENABLE)
		GUICtrlSetState($Staff_Delay_4, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_5, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_6, $GUI_DISABLE)

		$Staff_data_1 = "-" & Sqrt(GUICtrlRead($Staff_Delay_1)*GUICtrlRead($Staff_Delay_1))
		$Staff_data_2 = "-" & Sqrt(GUICtrlRead($Staff_Delay_2)*GUICtrlRead($Staff_Delay_2))
		$Staff_data_3 = Sqrt(GUICtrlRead($Staff_Delay_3)*GUICtrlRead($Staff_Delay_3))
		$Staff_data_4 = "-" & Sqrt(GUICtrlRead($Staff_Delay_4)*GUICtrlRead($Staff_Delay_4))
		$Staff_data_5 = "-" & Sqrt(GUICtrlRead($Staff_Delay_5)*GUICtrlRead($Staff_Delay_5))
		$Staff_data_6 = "-" & Sqrt(GUICtrlRead($Staff_Delay_6)*GUICtrlRead($Staff_Delay_6))

		IniWrite ( "attackhack.ini", "staff", "spell1delay", $Staff_data_1 )
		IniWrite ( "attackhack.ini", "staff", "spell2delay", $Staff_data_2 )
		IniWrite ( "attackhack.ini", "staff", "spell3delay", $Staff_data_3 )
		IniWrite ( "attackhack.ini", "staff", "spell4delay", $Staff_data_4 )
		IniWrite ( "attackhack.ini", "staff", "spell5delay", $Staff_data_5 )
		IniWrite ( "attackhack.ini", "staff", "spell6delay", $Staff_data_6 )

EndFunc

Func Staff_Spell4()
		GUICtrlSetState($Staff_Label_1, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_2, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_3, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_4, $GUI_ENABLE)
		GUICtrlSetState($Staff_Label_5, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_6, $GUI_DISABLE)

		GUICtrlSetState($Staff_Delay_1, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_2, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_3, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_4, $GUI_ENABLE)
		GUICtrlSetState($Staff_Delay_5, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_6, $GUI_DISABLE)

      	$Staff_data_1 = "-" & Sqrt(GUICtrlRead($Staff_Delay_1)*GUICtrlRead($Staff_Delay_1))
		$Staff_data_2 = "-" & Sqrt(GUICtrlRead($Staff_Delay_2)*GUICtrlRead($Staff_Delay_2))
		$Staff_data_3 = "-" & Sqrt(GUICtrlRead($Staff_Delay_3)*GUICtrlRead($Staff_Delay_3))
		$Staff_data_4 = Sqrt(GUICtrlRead($Staff_Delay_4)*GUICtrlRead($Staff_Delay_4))
		$Staff_data_5 = "-" & Sqrt(GUICtrlRead($Staff_Delay_5)*GUICtrlRead($Staff_Delay_5))
		$Staff_data_6 = "-" & Sqrt(GUICtrlRead($Staff_Delay_6)*GUICtrlRead($Staff_Delay_6))

		IniWrite ( "attackhack.ini", "staff", "spell1delay", $Staff_data_1 )
		IniWrite ( "attackhack.ini", "staff", "spell2delay", $Staff_data_2 )
		IniWrite ( "attackhack.ini", "staff", "spell3delay", $Staff_data_3 )
		IniWrite ( "attackhack.ini", "staff", "spell4delay", $Staff_data_4 )
		IniWrite ( "attackhack.ini", "staff", "spell5delay", $Staff_data_5 )
		IniWrite ( "attackhack.ini", "staff", "spell6delay", $Staff_data_6 )

EndFunc

Func Staff_Spell5()
		GUICtrlSetState($Staff_Label_1, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_2, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_3, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_4, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_5, $GUI_ENABLE)
		GUICtrlSetState($Staff_Label_6, $GUI_DISABLE)

		GUICtrlSetState($Staff_Delay_1, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_2, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_3, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_4, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_5, $GUI_ENABLE)
		GUICtrlSetState($Staff_Delay_6, $GUI_DISABLE)

		$Staff_data_1 = "-" & Sqrt(GUICtrlRead($Staff_Delay_1)*GUICtrlRead($Staff_Delay_1))
		$Staff_data_2 = "-" & Sqrt(GUICtrlRead($Staff_Delay_2)*GUICtrlRead($Staff_Delay_2))
		$Staff_data_3 = "-" & Sqrt(GUICtrlRead($Staff_Delay_3)*GUICtrlRead($Staff_Delay_3))
		$Staff_data_4 = "-" & Sqrt(GUICtrlRead($Staff_Delay_4)*GUICtrlRead($Staff_Delay_4))
		$Staff_data_5 = Sqrt(GUICtrlRead($Staff_Delay_5)*GUICtrlRead($Staff_Delay_5))
		$Staff_data_6 = "-" & Sqrt(GUICtrlRead($Staff_Delay_6)*GUICtrlRead($Staff_Delay_6))

		IniWrite ( "attackhack.ini", "staff", "spell1delay", $Staff_data_1 )
		IniWrite ( "attackhack.ini", "staff", "spell2delay", $Staff_data_2 )
		IniWrite ( "attackhack.ini", "staff", "spell3delay", $Staff_data_3 )
		IniWrite ( "attackhack.ini", "staff", "spell4delay", $Staff_data_4 )
		IniWrite ( "attackhack.ini", "staff", "spell5delay", $Staff_data_5 )
		IniWrite ( "attackhack.ini", "staff", "spell6delay", $Staff_data_6 )

EndFunc

Func Staff_Spell6()
		GUICtrlSetState($Staff_Label_1, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_2, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_3, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_4, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_5, $GUI_DISABLE)
		GUICtrlSetState($Staff_Label_6, $GUI_ENABLE)

		GUICtrlSetState($Staff_Delay_1, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_2, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_3, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_4, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_5, $GUI_DISABLE)
		GUICtrlSetState($Staff_Delay_6, $GUI_ENABLE)

		$Staff_data_1 = "-" & Sqrt(GUICtrlRead($Staff_Delay_1)*GUICtrlRead($Staff_Delay_1))
		$Staff_data_2 = "-" & Sqrt(GUICtrlRead($Staff_Delay_2)*GUICtrlRead($Staff_Delay_2))
		$Staff_data_3 = "-" & Sqrt(GUICtrlRead($Staff_Delay_3)*GUICtrlRead($Staff_Delay_3))
		$Staff_data_4 = "-" & Sqrt(GUICtrlRead($Staff_Delay_4)*GUICtrlRead($Staff_Delay_4))
		$Staff_data_5 = "-" & Sqrt(GUICtrlRead($Staff_Delay_5)*GUICtrlRead($Staff_Delay_5))
		$Staff_data_6 = Sqrt(GUICtrlRead($Staff_Delay_6)*GUICtrlRead($Staff_Delay_6))

		IniWrite ( "attackhack.ini", "staff", "spell1delay", $Staff_data_1 )
		IniWrite ( "attackhack.ini", "staff", "spell2delay", $Staff_data_2 )
		IniWrite ( "attackhack.ini", "staff", "spell3delay", $Staff_data_3 )
		IniWrite ( "attackhack.ini", "staff", "spell4delay", $Staff_data_4 )
		IniWrite ( "attackhack.ini", "staff", "spell5delay", $Staff_data_5 )
		IniWrite ( "attackhack.ini", "staff", "spell6delay", $Staff_data_6 )

EndFunc
